eststo clear
local VAR ln_wage PAY_PIECE_RATE  PAY_QUALITY_BONUS  PAY_OTHER_BONUS GENDER secondary_plus markraven
foreach v of local VAR{
eststo: reghdfe `v' sh_r_l if SAMPLE==1, abs(FE_factory TYPE_WORKER) vce(cluster FE_factory)	
  quietly estadd local est ="OLS", replace  
  quietly estadd local FE ="s,r(i)$", replace  
  quietly estadd local CTRL2 ="Yes", replace    
  quietly estadd scalar  U =  . , replace   
}
local VAR  EXP_GARMENT_MONTHS 
foreach v of local VAR{
eststo: reghdfe `v' sh_r_l GENDER secondary_plus AGE  if SAMPLE==1, abs(FE_factory TYPE_WORKER) vce(cluster FE_factory)		
  quietly estadd local est ="OLS", replace  
  quietly estadd local FE ="s,r(i)", replace  
  quietly estadd local CTRL2 ="Yes", replace    
  quietly estadd scalar  U =  . , replace  
}
esttab using "${tables}\TableC3.tex", ///
  title("Workers' Wages and Bonuses" \label{LaborWage}) ///
  label replace booktabs b(3) se(3) noconstant obslast substitute(\_ _) ///
  drop() order() /// 
  stats(FE   r2   N   , fmt( %~#s   2 %12.0fc  )  ///
  labels("FEs"  `"\(R^{2}\)"'  "Obs."  ))   ///
  star(* 0.10 ** 0.05 *** 0.01) ///
  nonotes  